Skip to content

Conversation

LeosBitto
Copy link

@LeosBitto LeosBitto commented Jul 27, 2025

fix a bug in ArrayJdbcType which exposes itself in combination with setting hibernate.type.java_time_use_direct_jdbc=true and add test for OffsetDateTime in an array to GlobalJavaTimeJdbcTypeTests


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19657

…tion with setting hibernate.type.java_time_use_direct_jdbc=true
Comment on lines +215 to +218
final var nativeQuery = session.createNativeQuery(
"WITH data AS (SELECT unnest(?) AS id, unnest(?) AS offset_date_time)"
+ " INSERT INTO EntityWithJavaTimeValues (id, theOffsetDateTime) SELECT * FROM data"
);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createNativeQuery
should be avoided because it has been deprecated.
Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @LeosBitto. Please open a PR against the main branch, the hibernate team will then evaluate whether to back port the changes to earlier maintenance versions.

@LeosBitto
Copy link
Author

Thanks for the contribution @LeosBitto. Please open a PR against the main branch, the hibernate team will then evaluate whether to back port the changes to earlier maintenance versions.

I cannot use Hibernate 7, because there is no support for it in Spring Boot yet, so I have intentionally analyzed and fixed this bug in Hibernate 6.6 (where it actually has been introduced in ed2fdce ).

@gavinking
Copy link
Member

@LeosBitto It's the job of the maintainers of Hibernate to evaluate pull requests, to make decisions about which changes should be back-ported, and to specify the process that is followed by everyone.

Therefore, if you would still like to see this work merged, I suggest that the quickest way is to stop arguing and do exactly as has been extremely politely requested of you by Marco.

@LeosBitto
Copy link
Author

@LeosBitto It's the job of the maintainers of Hibernate to evaluate pull requests, to make decisions about which changes should be back-ported, and to specify the process that is followed by everyone.

Therefore, if you would still like to see this work merged, I suggest that the quickest way is to stop arguing and do exactly as has been extremely politely requested of you by Marco.

OK, I will open a pull request against Hibernate 7, but I cannot promise when I will have enough time to do it. Feel free to take my current work and port it to Hibernate 7 if you would like this bug to be solved sooner.

@beikov
Copy link
Member

beikov commented Jul 29, 2025

Thanks for your contribution. Superseded by #10652

@beikov beikov closed this Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants